<template>
	<view class="container">
		<view class="txt">请点击“蓝色月份”缴费</view>
		<view class="txt" style="color: #449BED;" @click="mouth(item.id)" v-for="(item,index) in list">{{item.month}}
		</view>
	</view>
</template>

<script>
	import {
		orderlist
	} from '@/api/order.js'
	export default {
		data() {
			return {
				list: []
			};
		},
		onLoad(e) {
			this.orderlist(e.student_id)
		},
		methods: {
			mouth(id) {
				uni.navigateTo({
					url: "/pages/pay/pay?id=" + id
				})
			},
			//获取订单列表
			async orderlist(student_id) {
				let res = await orderlist({
					student_id
				})
				if (res.code == 200) {
					this.list = res.data
				} else {
					uni.$u.toast(res.msg);
				}
			},
		}
	}
</script>

<style lang="scss">
	.container {
		width: 100%;
		height: 100%;
		padding: 100rpx 50rpx;
		box-sizing: border-box;

		.txt {
			color: #3D3D3D;
			margin-bottom: 40rpx;
		}
	}
</style>